package com.mtnz.njk.Util;

public enum OrderStatus {
    WF(0, "未付款"),
    YF(1, "已付款"),
    YFH(2, "已发货"),
    YWC(3, "已完成"),
    KK(7, "已完成"),
    KKD(8, "已完成"),
    WFK(10, "已完成"),
    FQ(11, "已完成");

    private int code;

    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    OrderStatus(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getOrderStatus(int code) {
        for (OrderStatus o : OrderStatus.values()) {
            if (o.getCode() == code) {
                return o.getMsg();
            }
        }
        return "信息出错，无法找到当前状态";
    }
}
